package com.ruoyi.web.controller.system;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.core.domain.entity.SysMenu;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
import com.ruoyi.system.domain.Sysstaffshow;
import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.system.service.ISysstaffService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 菜单信息
 * 
 * @author ruoyi
 */
@Controller
@RequestMapping("/system/staffs")
public class SysstaffController extends BaseController
{
    private String prefix = "system/staffs";

    @Autowired
    private ISysstaffService iSysstaffService;

    @RequiresPermissions("system:staffs:view")
    @GetMapping()
    public String menu()
    {
        return prefix + "/staffs";
    }

    @RequiresPermissions("system:staffs:list")
    @PostMapping("/list")
    @ResponseBody
    public List<Sysstaffshow> list()
    {
        Long userId = ShiroUtils.getUserId();
        List<Sysstaffshow> staffshow = iSysstaffService.staffshow();
        return staffshow;
    }



}